<#import "/spring.ftl" as spring />

<#if data??>
<@spring.bind "data" />
</#if>
<#switch type>
<#case 1>
<div class="accSettingData" id="bi">
	<div class="accSettingRow">	
		<span class="fl accDataL">Họ và tên:</span>
	    <span class="fl accDataR">${data.fullName}</span>
	    <span class="fl accDataL">Ngày Sinh:</span>
	    <span class="fl accDataR">${data.birthdayDate} tháng ${data.birthdayMonth} năm ${data.birthdayYear}</span>
	    <span class="fl accDataL">Giới Tính:</span>
	    <span class="fl accDataR">${data.male?string("Nam","Nữ")}</span>                
	    <span class="fl accDataL">Email:</span>
	    <span class="fl accDataR">${data.email}</span>
	</div>
</div>
<#break>
<#case 2>
<div class="accSettingData" id="ci">
	<div class="accSettingRow">	
		<#if data.yahoo??>
		<span class="fl accDataL">Yahoo ID:</span>
	    <span class="fl accDataR">${data.yahoo}</span>
	    </#if>
	    <#if data.skype??>
	    <span class="fl accDataL">Skype ID:</span>
	    <span class="fl accDataR">${data.skype}</span>
	    </#if>
	    <#if data.facebook??>
	    <span class="fl accDataL">Facebook:</span>
	    <span class="fl accDataR">${data.facebook}</span>
	    </#if>
	    <#if data.mobile??>
	    <span class="fl accDataL">ĐTDĐ</span>
	    <span class="fl accDataR">${data.mobile}</span>
	    </#if>
	    <#if data.website??>
	    <span class="fl accDataL">Website:</span>
	    <span class="fl accDataR"><a href="${data.website}">${data.website}</a></span>
	    </#if>
	</div>
</div>
<#break>
<#case 3>   
<div class="accSettingData">
<#if schools??>
<#list schools as school>
<div class="accSettingRow">		
	<span class="fl accDataL">Trường:</span>
    <span class="fl accDataR">${school.name}</span>
    <#if school.cityName??>
    <span class="fl accDataL">Tỉnh thành:</span>
    <span class="fl accDataR">${school.cityName}</span>
    </#if>
    <#if school.mainStudy??>
    <span class="fl accDataL">Chuyên ngành:</span>
    <span class="fl accDataR">${school.mainStudy}</span>
    </#if>
    <#if school.title??>
    <span class="fl accDataL">Trình độ:</span>
    <span class="fl accDataR">${school.title}</span>
    </#if>
    <#if (school.from??)>
    <#assign to=""/>
    <#if (school.to?? && school.to > 0)>
    	<#assign to=("đến " + school.to)/>
    <#elseif (school.to?? && school.to <= 0)>
    	<#assign to="đến hiện tại">
    </#if>
    <span class="fl accDataL">Niên khóa:</span>
    <span class="fl accDataR">${school.from} ${to}</span>
    </#if>
 </div>            
 </#list>
 </#if> 
 <#if companies??>
 <#list companies as company>
 <div class="accSettingRow">		
	<span class="fl accDataL">Công ty:</span>
    <span class="fl accDataR">${company.name}</span>
    <#if company.cityName??>
    <span class="fl accDataL">Tỉnh thành:</span>
    <span class="fl accDataR">${company.cityName}</span>
    </#if>
    <#if company.field??>
    <span class="fl accDataL">Lĩnh vực:</span>
    <span class="fl accDataR">${company.field}</span>
    </#if>
    <#if company.title??>
    <span class="fl accDataL">Chức danh:</span>
    <span class="fl accDataR">${company.title}</span>
    </#if>
    <#if company.fromYear??>
    <#assign to=""/>
    <#if (company.toYear?? && company.toYear > 0)>
    	<#assign to=("đến" + company.toYear)/>
    <#elseif (company.toYear?? && company.toYear <= 0)>
    	<#assign to="đến hiện tại">
    </#if>
    <span class="fl accDataL">Thời gian:</span>
    <span class="fl accDataR">${company.fromYear} ${to}</span>
    </#if>
 </div>
 </#list>
 </#if>
</div>
<#break>
<#case 4>
<div class="accSettingData" id="rt">
	<div class="accSettingRow">	
		<#if data.address??>
		<span class="fl accDataL">Địa chỉ:</span>
	    <span class="fl accDataR">${data.address}</span>
	    </#if>
	    <#if data.district??>
	    <span class="fl accDataL">Quận/Huyện:</span>
	    <span class="fl accDataR">${data.district}</span>
	    </#if>
	    <#if data.cityName??>
	    <span class="fl accDataL">Tỉnh thành:</span>
	    <span class="fl accDataR">${data.cityName}</span>
	    </#if>
	</div>
</div>
<#break>
<#case 5>
<div class="accSettingData">
	<div class="accSettingRow">	
		<#if categories??>
		<span class="fl accDataL">Lĩnh vực quan tâm:</span>
	    <span class="fl accDataR">
	    	<#list categories?keys as prop>
			    ${categories[prop]}<#if prop_has_next>, </#if>					    
			</#list>
	    </span>
	    </#if>
	    <#if hobbies.music??>
	    <span class="fl accDataL">Dòng nhạc, thể loại nhạc:</span>
	    <span class="fl accDataR">
	    	<#list hobbies.music?keys as prop>
	    		${hobbies.music[prop]}<#if prop_has_next>, </#if>
	    	</#list>
	    </span>
	    </#if>
	    <#if hobbies.movie??>
	    <span class="fl accDataL">Thể loại phim:</span>
	    <span class="fl accDataR">
	    	<#list hobbies.movie?keys as prop>
	    		${hobbies.movie[prop]}<#if prop_has_next>, </#if>
	    	</#list>
	    </span>
	    </#if>
	    <#if hobbies.book??>
	    <span class="fl accDataL">Thể loại sách, tên sách:</span>
	    <span class="fl accDataR">
	    	<#list hobbies.book?keys as prop>
	    		${hobbies.book[prop]}<#if prop_has_next>, </#if>
	    	</#list>
	    </span>
	    </#if>
	    <#if hobbies.food??>
	    <span class="fl accDataL">Món ăn khoái khẩu:</span>
	    <span class="fl accDataR">
	    	<#list hobbies.food?keys as prop>
	    		${hobbies.food[prop]}<#if prop_has_next>, </#if>
	    	</#list>
	    </span>
	    </#if>
	    <#if hobbies.another??>
	    <span class="fl accDataL">Sở thích khác:</span>
	    <span class="fl accDataR">
	    	<#list hobbies.another?keys as prop>
	    		${hobbies.another[prop]}<#if prop_has_next>, </#if>
	    	</#list>
	    </span>
	    </#if>
	</div>	 
</div>
<#break>
<#case 6>
<#break>
</#switch>